<html>
<head>
    <script>
        function iFrameTest() {
            if (window.testRunner)
                testRunner.dumpAsText();

            var localPageLocation = "file:///tmp/web_tests/http/tests/security/resources/localPage.html";
            if (window.testRunner)
                localPageLocation = testRunner.pathToLocalResource(localPageLocation);

            var localIframeElement = document.createElement("iFrame");
            localIframeElement.setAttribute("id", "myFrame");
            localIframeElement.setAttribute("src", localPageLocation);

            document.body.appendChild(localIframeElement);
    
            var result = document.getElementById("result");

            var myFrameDocument = document.getElementById("myFrame").contentDocument;
            if (myFrameDocument)
                result.innerHTML = "Test Passed. Local page loaded locally into iFrame.";
            else
                result.innerHTML = "Test Failed: Local page not locally loaded into iFrame.";
        }
    </script>
</head>
<body onload="iFrameTest()">
    <div id="div0">
        This test is to see if a local file can include a local page in an iFrame.
        <br/>
        Currently this test cannot be run manually on Windows because we do not have
        a function like pathToLocalResource() outside of DRT.
        <br/>
    </div>
    </br>
    <div id="result">
        Test not run correctly.
    </div>
</body>
</html>
